package com.banmao.algorithm.No1To100.No2_Add_Two_Numbers;

class ListNode {
    int val;
    ListNode next;
    ListNode() {}
    ListNode(int val) { this.val = val; }
    ListNode(int val, ListNode next) { this.val = val; this.next = next; }

    @Override
    public String toString() {
        if(next == null) {
            return val+"";
        }
        return val +" " + next;
    }

}
